package com.hcms.admin.dto;

import cn.hutool.core.bean.BeanUtil;
import com.hcms.common.util.TreeNode;
import com.hcms.mybatis.dto.CmsCateOption;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CmsCateOptionResponse implements Serializable, TreeNode<CmsCateOptionResponse, Long> {

    private Long id;

    private String cateName;

    private Long parentId;

    private Long moduleId;

    private String moduleName;

    private String modelName;

    private List<CmsCateOptionResponse> children;

    public CmsCateOptionResponse(CmsCateOption option) {
        BeanUtil.copyProperties(option, this);
    }

}
